package com.guoji.controller.logincontroller;

import com.guoji.service.TbCrmEmployeeService;
import com.guoji.vo.LoginUser;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@RequestMapping("/login")
@Controller
public class loginController {
    @Resource
    private TbCrmEmployeeService tbCrmEmployeeService;
    /**
     * 跳转登录界面*/
    @RequestMapping("/login")
    public String login(){
        return "login";
    }

    /**
     * 登录验证*/
    @RequestMapping("/getVerify")
    @ResponseBody
    public ModelMap getVerify(@RequestBody LoginUser loginUser){
        ModelMap verify = tbCrmEmployeeService.getVerify(loginUser);
        return verify;
    }

    /**
     * 跳转登录界面*/
    @RequestMapping("/index")
    public String index(){
        return "index";
    }

}
